3.1.95 \(\int \text {sech}^3(c+d x) (a+b \tanh ^2(c+d x))^2 \, dx\) [95]

3.1.95.1 Optimal result
3.1.95.2 Mathematica [C] (warning: unable to verify)
3.1.95.3 Rubi [A] (verified)
3.1.95.4 Maple [A] (verified)
3.1.95.5 Fricas [B] (verification not implemented)
3.1.95.6 Sympy [F]
3.1.95.7 Maxima [B] (verification not implemented)
3.1.95.8 Giac [B] (verification not implemented)
3.1.95.9 Mupad [B] (verification not implemented)

3.1.95.1 Optimal result

Integrand size = 23, antiderivative size = 125 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {\left (8 a^2+4 a b+b^2\right ) \arctan (\sinh (c+d x))}{16 d}+\frac {\left (8 a^2+4 a b+b^2\right ) \text {sech}(c+d x) \tanh (c+d x)}{16 d}-\frac {b (8 a+3 b) \text {sech}^3(c+d x) \tanh (c+d x)}{24 d}-\frac {b \text {sech}^5(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{6 d} \]

output
1/16*(8*a^2+4*a*b+b^2)*arctan(sinh(d*x+c))/d+1/16*(8*a^2+4*a*b+b^2)*sech(d 
*x+c)*tanh(d*x+c)/d-1/24*b*(8*a+3*b)*sech(d*x+c)^3*tanh(d*x+c)/d-1/6*b*sec 
h(d*x+c)^5*(a+(a+b)*sinh(d*x+c)^2)*tanh(d*x+c)/d
 
3.1.95.2 Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 9.28 (sec) , antiderivative size = 792, normalized size of antiderivative = 6.34 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {a^2 \sinh (c+d x) \left (-\frac {23555 (a+b)}{a}-\frac {32970 (a+b)^2}{a^2}-14980 \text {csch}^2(c+d x)-\frac {91875 (a+b) \text {csch}^2(c+d x)}{a}-65625 \text {csch}^4(c+d x)-\frac {8855 (a+b)^2 \sinh ^2(c+d x)}{a^2}-620 \, _4F_3\left (\frac {3}{2},2,2,2;1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^2(c+d x)-160 \, _5F_4\left (\frac {3}{2},2,2,2,2;1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^2(c+d x)-16 \, _6F_5\left (\frac {3}{2},2,2,2,2,2;1,1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^2(c+d x)-\frac {968 (a+b) \, _4F_3\left (\frac {3}{2},2,2,2;1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^4(c+d x)}{a}-\frac {288 (a+b) \, _5F_4\left (\frac {3}{2},2,2,2,2;1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^4(c+d x)}{a}-\frac {32 (a+b) \, _6F_5\left (\frac {3}{2},2,2,2,2,2;1,1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^4(c+d x)}{a}-\frac {380 (a+b)^2 \, _4F_3\left (\frac {3}{2},2,2,2;1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^6(c+d x)}{a^2}-\frac {128 (a+b)^2 \, _5F_4\left (\frac {3}{2},2,2,2,2;1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^6(c+d x)}{a^2}-\frac {16 (a+b)^2 \, _6F_5\left (\frac {3}{2},2,2,2,2,2;1,1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right ) \sinh ^6(c+d x)}{a^2}+\frac {65625 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{\left (-\sinh ^2(c+d x)\right )^{5/2}}+\frac {1680 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \sinh ^4(c+d x)}{\left (-\sinh ^2(c+d x)\right )^{5/2}}-\frac {36855 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{\left (-\sinh ^2(c+d x)\right )^{3/2}}-\frac {91875 (a+b) \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{a \left (-\sinh ^2(c+d x)\right )^{3/2}}+\frac {54180 (a+b) \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{a \sqrt {-\sinh ^2(c+d x)}}+\frac {32970 (a+b)^2 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{a^2 \sqrt {-\sinh ^2(c+d x)}}+\frac {525 (a+b)^2 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \sinh ^4(c+d x)}{a^2 \sqrt {-\sinh ^2(c+d x)}}-\frac {1365 (a+b) \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \sqrt {-\sinh ^2(c+d x)}}{a}-\frac {19845 (a+b)^2 \text {arctanh}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \sqrt {-\sinh ^2(c+d x)}}{a^2}\right )}{2520 d} \]

input
Integrate[Sech[c + d*x]^3*(a + b*Tanh[c + d*x]^2)^2,x]
 
output
(a^2*Sinh[c + d*x]*((-23555*(a + b))/a - (32970*(a + b)^2)/a^2 - 14980*Csc 
h[c + d*x]^2 - (91875*(a + b)*Csch[c + d*x]^2)/a - 65625*Csch[c + d*x]^4 - 
 (8855*(a + b)^2*Sinh[c + d*x]^2)/a^2 - 620*HypergeometricPFQ[{3/2, 2, 2, 
2}, {1, 1, 9/2}, -Sinh[c + d*x]^2]*Sinh[c + d*x]^2 - 160*HypergeometricPFQ 
[{3/2, 2, 2, 2, 2}, {1, 1, 1, 9/2}, -Sinh[c + d*x]^2]*Sinh[c + d*x]^2 - 16 
*HypergeometricPFQ[{3/2, 2, 2, 2, 2, 2}, {1, 1, 1, 1, 9/2}, -Sinh[c + d*x] 
^2]*Sinh[c + d*x]^2 - (968*(a + b)*HypergeometricPFQ[{3/2, 2, 2, 2}, {1, 1 
, 9/2}, -Sinh[c + d*x]^2]*Sinh[c + d*x]^4)/a - (288*(a + b)*Hypergeometric 
PFQ[{3/2, 2, 2, 2, 2}, {1, 1, 1, 9/2}, -Sinh[c + d*x]^2]*Sinh[c + d*x]^4)/ 
a - (32*(a + b)*HypergeometricPFQ[{3/2, 2, 2, 2, 2, 2}, {1, 1, 1, 1, 9/2}, 
 -Sinh[c + d*x]^2]*Sinh[c + d*x]^4)/a - (380*(a + b)^2*HypergeometricPFQ[{ 
3/2, 2, 2, 2}, {1, 1, 9/2}, -Sinh[c + d*x]^2]*Sinh[c + d*x]^6)/a^2 - (128* 
(a + b)^2*HypergeometricPFQ[{3/2, 2, 2, 2, 2}, {1, 1, 1, 9/2}, -Sinh[c + d 
*x]^2]*Sinh[c + d*x]^6)/a^2 - (16*(a + b)^2*HypergeometricPFQ[{3/2, 2, 2, 
2, 2, 2}, {1, 1, 1, 1, 9/2}, -Sinh[c + d*x]^2]*Sinh[c + d*x]^6)/a^2 + (656 
25*ArcTanh[Sqrt[-Sinh[c + d*x]^2]])/(-Sinh[c + d*x]^2)^(5/2) + (1680*ArcTa 
nh[Sqrt[-Sinh[c + d*x]^2]]*Sinh[c + d*x]^4)/(-Sinh[c + d*x]^2)^(5/2) - (36 
855*ArcTanh[Sqrt[-Sinh[c + d*x]^2]])/(-Sinh[c + d*x]^2)^(3/2) - (91875*(a 
+ b)*ArcTanh[Sqrt[-Sinh[c + d*x]^2]])/(a*(-Sinh[c + d*x]^2)^(3/2)) + (5418 
0*(a + b)*ArcTanh[Sqrt[-Sinh[c + d*x]^2]])/(a*Sqrt[-Sinh[c + d*x]^2]) +...
 
3.1.95.3 Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4159, 315, 298, 215, 216}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sec (i c+i d x)^3 \left (a-b \tan (i c+i d x)^2\right )^2dx\)

\(\Big \downarrow \) 4159

\(\displaystyle \frac {\int \frac {\left ((a+b) \sinh ^2(c+d x)+a\right )^2}{\left (\sinh ^2(c+d x)+1\right )^4}d\sinh (c+d x)}{d}\)

\(\Big \downarrow \) 315

\(\displaystyle \frac {\frac {1}{6} \int \frac {3 (a+b) (2 a+b) \sinh ^2(c+d x)+a (6 a+b)}{\left (\sinh ^2(c+d x)+1\right )^3}d\sinh (c+d x)-\frac {b \sinh (c+d x) \left ((a+b) \sinh ^2(c+d x)+a\right )}{6 \left (\sinh ^2(c+d x)+1\right )^3}}{d}\)

\(\Big \downarrow \) 298

\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (8 a^2+4 a b+b^2\right ) \int \frac {1}{\left (\sinh ^2(c+d x)+1\right )^2}d\sinh (c+d x)-\frac {b (8 a+3 b) \sinh (c+d x)}{4 \left (\sinh ^2(c+d x)+1\right )^2}\right )-\frac {b \sinh (c+d x) \left ((a+b) \sinh ^2(c+d x)+a\right )}{6 \left (\sinh ^2(c+d x)+1\right )^3}}{d}\)

\(\Big \downarrow \) 215

\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (8 a^2+4 a b+b^2\right ) \left (\frac {1}{2} \int \frac {1}{\sinh ^2(c+d x)+1}d\sinh (c+d x)+\frac {\sinh (c+d x)}{2 \left (\sinh ^2(c+d x)+1\right )}\right )-\frac {b (8 a+3 b) \sinh (c+d x)}{4 \left (\sinh ^2(c+d x)+1\right )^2}\right )-\frac {b \sinh (c+d x) \left ((a+b) \sinh ^2(c+d x)+a\right )}{6 \left (\sinh ^2(c+d x)+1\right )^3}}{d}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\frac {1}{6} \left (\frac {3}{4} \left (8 a^2+4 a b+b^2\right ) \left (\frac {1}{2} \arctan (\sinh (c+d x))+\frac {\sinh (c+d x)}{2 \left (\sinh ^2(c+d x)+1\right )}\right )-\frac {b (8 a+3 b) \sinh (c+d x)}{4 \left (\sinh ^2(c+d x)+1\right )^2}\right )-\frac {b \sinh (c+d x) \left ((a+b) \sinh ^2(c+d x)+a\right )}{6 \left (\sinh ^2(c+d x)+1\right )^3}}{d}\)

input
Int[Sech[c + d*x]^3*(a + b*Tanh[c + d*x]^2)^2,x]
 
output
(-1/6*(b*Sinh[c + d*x]*(a + (a + b)*Sinh[c + d*x]^2))/(1 + Sinh[c + d*x]^2 
)^3 + (-1/4*(b*(8*a + 3*b)*Sinh[c + d*x])/(1 + Sinh[c + d*x]^2)^2 + (3*(8* 
a^2 + 4*a*b + b^2)*(ArcTan[Sinh[c + d*x]]/2 + Sinh[c + d*x]/(2*(1 + Sinh[c 
 + d*x]^2))))/4)/6)/d
 

3.1.95.3.1 Defintions of rubi rules used

rule 215
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) 
/(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1))   Int[(a + b*x^2)^(p + 1 
), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 
*p])
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 298
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-( 
b*c - a*d))*x*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] - Simp[(a*d - b*c*( 
2*p + 3))/(2*a*b*(p + 1))   Int[(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, 
 c, d, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/2 + p, 0])
 

rule 315
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[(a*d - c*b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1)/(2*a*b*(p + 1))), 
x] - Simp[1/(2*a*b*(p + 1))   Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^(q - 2)*S 
imp[c*(a*d - c*b*(2*p + 3)) + d*(a*d*(2*(q - 1) + 1) - b*c*(2*(p + q) + 1)) 
*x^2, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, - 
1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, 2, p, q, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4159
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_ 
))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f 
  Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2 
*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f} 
, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
 
3.1.95.4 Maple [A] (verified)

Time = 14.47 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.39

method result size
derivativedivides \(\frac {a^{2} \left (\frac {\operatorname {sech}\left (d x +c \right ) \tanh \left (d x +c \right )}{2}+\arctan \left ({\mathrm e}^{d x +c}\right )\right )+2 a b \left (-\frac {\sinh \left (d x +c \right )}{3 \cosh \left (d x +c \right )^{4}}+\frac {\left (\frac {\operatorname {sech}\left (d x +c \right )^{3}}{4}+\frac {3 \,\operatorname {sech}\left (d x +c \right )}{8}\right ) \tanh \left (d x +c \right )}{3}+\frac {\arctan \left ({\mathrm e}^{d x +c}\right )}{4}\right )+b^{2} \left (-\frac {\sinh \left (d x +c \right )^{3}}{3 \cosh \left (d x +c \right )^{6}}-\frac {\sinh \left (d x +c \right )}{5 \cosh \left (d x +c \right )^{6}}+\frac {\left (\frac {\operatorname {sech}\left (d x +c \right )^{5}}{6}+\frac {5 \operatorname {sech}\left (d x +c \right )^{3}}{24}+\frac {5 \,\operatorname {sech}\left (d x +c \right )}{16}\right ) \tanh \left (d x +c \right )}{5}+\frac {\arctan \left ({\mathrm e}^{d x +c}\right )}{8}\right )}{d}\) \(174\)
default \(\frac {a^{2} \left (\frac {\operatorname {sech}\left (d x +c \right ) \tanh \left (d x +c \right )}{2}+\arctan \left ({\mathrm e}^{d x +c}\right )\right )+2 a b \left (-\frac {\sinh \left (d x +c \right )}{3 \cosh \left (d x +c \right )^{4}}+\frac {\left (\frac {\operatorname {sech}\left (d x +c \right )^{3}}{4}+\frac {3 \,\operatorname {sech}\left (d x +c \right )}{8}\right ) \tanh \left (d x +c \right )}{3}+\frac {\arctan \left ({\mathrm e}^{d x +c}\right )}{4}\right )+b^{2} \left (-\frac {\sinh \left (d x +c \right )^{3}}{3 \cosh \left (d x +c \right )^{6}}-\frac {\sinh \left (d x +c \right )}{5 \cosh \left (d x +c \right )^{6}}+\frac {\left (\frac {\operatorname {sech}\left (d x +c \right )^{5}}{6}+\frac {5 \operatorname {sech}\left (d x +c \right )^{3}}{24}+\frac {5 \,\operatorname {sech}\left (d x +c \right )}{16}\right ) \tanh \left (d x +c \right )}{5}+\frac {\arctan \left ({\mathrm e}^{d x +c}\right )}{8}\right )}{d}\) \(174\)
risch \(\frac {{\mathrm e}^{d x +c} \left (24 a^{2} {\mathrm e}^{10 d x +10 c}+12 a b \,{\mathrm e}^{10 d x +10 c}+3 b^{2} {\mathrm e}^{10 d x +10 c}+72 a^{2} {\mathrm e}^{8 d x +8 c}-60 a b \,{\mathrm e}^{8 d x +8 c}-47 b^{2} {\mathrm e}^{8 d x +8 c}+48 a^{2} {\mathrm e}^{6 d x +6 c}-72 a b \,{\mathrm e}^{6 d x +6 c}+78 b^{2} {\mathrm e}^{6 d x +6 c}-48 a^{2} {\mathrm e}^{4 d x +4 c}+72 a b \,{\mathrm e}^{4 d x +4 c}-78 \,{\mathrm e}^{4 d x +4 c} b^{2}-72 a^{2} {\mathrm e}^{2 d x +2 c}+60 a b \,{\mathrm e}^{2 d x +2 c}+47 \,{\mathrm e}^{2 d x +2 c} b^{2}-24 a^{2}-12 a b -3 b^{2}\right )}{24 d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{6}}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a^{2}}{2 d}+\frac {i b a \ln \left ({\mathrm e}^{d x +c}+i\right )}{4 d}+\frac {i b^{2} \ln \left ({\mathrm e}^{d x +c}+i\right )}{16 d}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) a^{2}}{2 d}-\frac {i b \ln \left ({\mathrm e}^{d x +c}-i\right ) a}{4 d}-\frac {i b^{2} \ln \left ({\mathrm e}^{d x +c}-i\right )}{16 d}\) \(358\)

input
int(sech(d*x+c)^3*(a+b*tanh(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
 
output
1/d*(a^2*(1/2*sech(d*x+c)*tanh(d*x+c)+arctan(exp(d*x+c)))+2*a*b*(-1/3/cosh 
(d*x+c)^4*sinh(d*x+c)+1/3*(1/4*sech(d*x+c)^3+3/8*sech(d*x+c))*tanh(d*x+c)+ 
1/4*arctan(exp(d*x+c)))+b^2*(-1/3*sinh(d*x+c)^3/cosh(d*x+c)^6-1/5*sinh(d*x 
+c)/cosh(d*x+c)^6+1/5*(1/6*sech(d*x+c)^5+5/24*sech(d*x+c)^3+5/16*sech(d*x+ 
c))*tanh(d*x+c)+1/8*arctan(exp(d*x+c))))
 
3.1.95.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2824 vs. \(2 (117) = 234\).

Time = 0.28 (sec) , antiderivative size = 2824, normalized size of antiderivative = 22.59 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\text {Too large to display} \]

input
integrate(sech(d*x+c)^3*(a+b*tanh(d*x+c)^2)^2,x, algorithm="fricas")
 
output
1/24*(3*(8*a^2 + 4*a*b + b^2)*cosh(d*x + c)^11 + 33*(8*a^2 + 4*a*b + b^2)* 
cosh(d*x + c)*sinh(d*x + c)^10 + 3*(8*a^2 + 4*a*b + b^2)*sinh(d*x + c)^11 
+ (72*a^2 - 60*a*b - 47*b^2)*cosh(d*x + c)^9 + (165*(8*a^2 + 4*a*b + b^2)* 
cosh(d*x + c)^2 + 72*a^2 - 60*a*b - 47*b^2)*sinh(d*x + c)^9 + 9*(55*(8*a^2 
 + 4*a*b + b^2)*cosh(d*x + c)^3 + (72*a^2 - 60*a*b - 47*b^2)*cosh(d*x + c) 
)*sinh(d*x + c)^8 + 6*(8*a^2 - 12*a*b + 13*b^2)*cosh(d*x + c)^7 + 6*(165*( 
8*a^2 + 4*a*b + b^2)*cosh(d*x + c)^4 + 6*(72*a^2 - 60*a*b - 47*b^2)*cosh(d 
*x + c)^2 + 8*a^2 - 12*a*b + 13*b^2)*sinh(d*x + c)^7 + 42*(33*(8*a^2 + 4*a 
*b + b^2)*cosh(d*x + c)^5 + 2*(72*a^2 - 60*a*b - 47*b^2)*cosh(d*x + c)^3 + 
 (8*a^2 - 12*a*b + 13*b^2)*cosh(d*x + c))*sinh(d*x + c)^6 - 6*(8*a^2 - 12* 
a*b + 13*b^2)*cosh(d*x + c)^5 + 6*(231*(8*a^2 + 4*a*b + b^2)*cosh(d*x + c) 
^6 + 21*(72*a^2 - 60*a*b - 47*b^2)*cosh(d*x + c)^4 + 21*(8*a^2 - 12*a*b + 
13*b^2)*cosh(d*x + c)^2 - 8*a^2 + 12*a*b - 13*b^2)*sinh(d*x + c)^5 + 6*(16 
5*(8*a^2 + 4*a*b + b^2)*cosh(d*x + c)^7 + 21*(72*a^2 - 60*a*b - 47*b^2)*co 
sh(d*x + c)^5 + 35*(8*a^2 - 12*a*b + 13*b^2)*cosh(d*x + c)^3 - 5*(8*a^2 - 
12*a*b + 13*b^2)*cosh(d*x + c))*sinh(d*x + c)^4 - (72*a^2 - 60*a*b - 47*b^ 
2)*cosh(d*x + c)^3 + (495*(8*a^2 + 4*a*b + b^2)*cosh(d*x + c)^8 + 84*(72*a 
^2 - 60*a*b - 47*b^2)*cosh(d*x + c)^6 + 210*(8*a^2 - 12*a*b + 13*b^2)*cosh 
(d*x + c)^4 - 60*(8*a^2 - 12*a*b + 13*b^2)*cosh(d*x + c)^2 - 72*a^2 + 60*a 
*b + 47*b^2)*sinh(d*x + c)^3 + 3*(55*(8*a^2 + 4*a*b + b^2)*cosh(d*x + c...
 
3.1.95.6 Sympy [F]

\[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \operatorname {sech}^{3}{\left (c + d x \right )}\, dx \]

input
integrate(sech(d*x+c)**3*(a+b*tanh(d*x+c)**2)**2,x)
 
output
Integral((a + b*tanh(c + d*x)**2)**2*sech(c + d*x)**3, x)
 
3.1.95.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 345 vs. \(2 (117) = 234\).

Time = 0.28 (sec) , antiderivative size = 345, normalized size of antiderivative = 2.76 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=-\frac {1}{24} \, b^{2} {\left (\frac {3 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {3 \, e^{\left (-d x - c\right )} - 47 \, e^{\left (-3 \, d x - 3 \, c\right )} + 78 \, e^{\left (-5 \, d x - 5 \, c\right )} - 78 \, e^{\left (-7 \, d x - 7 \, c\right )} + 47 \, e^{\left (-9 \, d x - 9 \, c\right )} - 3 \, e^{\left (-11 \, d x - 11 \, c\right )}}{d {\left (6 \, e^{\left (-2 \, d x - 2 \, c\right )} + 15 \, e^{\left (-4 \, d x - 4 \, c\right )} + 20 \, e^{\left (-6 \, d x - 6 \, c\right )} + 15 \, e^{\left (-8 \, d x - 8 \, c\right )} + 6 \, e^{\left (-10 \, d x - 10 \, c\right )} + e^{\left (-12 \, d x - 12 \, c\right )} + 1\right )}}\right )} - \frac {1}{2} \, a b {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )} - 7 \, e^{\left (-3 \, d x - 3 \, c\right )} + 7 \, e^{\left (-5 \, d x - 5 \, c\right )} - e^{\left (-7 \, d x - 7 \, c\right )}}{d {\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} + 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-8 \, d x - 8 \, c\right )} + 1\right )}}\right )} - a^{2} {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} \]

input
integrate(sech(d*x+c)^3*(a+b*tanh(d*x+c)^2)^2,x, algorithm="maxima")
 
output
-1/24*b^2*(3*arctan(e^(-d*x - c))/d - (3*e^(-d*x - c) - 47*e^(-3*d*x - 3*c 
) + 78*e^(-5*d*x - 5*c) - 78*e^(-7*d*x - 7*c) + 47*e^(-9*d*x - 9*c) - 3*e^ 
(-11*d*x - 11*c))/(d*(6*e^(-2*d*x - 2*c) + 15*e^(-4*d*x - 4*c) + 20*e^(-6* 
d*x - 6*c) + 15*e^(-8*d*x - 8*c) + 6*e^(-10*d*x - 10*c) + e^(-12*d*x - 12* 
c) + 1))) - 1/2*a*b*(arctan(e^(-d*x - c))/d - (e^(-d*x - c) - 7*e^(-3*d*x 
- 3*c) + 7*e^(-5*d*x - 5*c) - e^(-7*d*x - 7*c))/(d*(4*e^(-2*d*x - 2*c) + 6 
*e^(-4*d*x - 4*c) + 4*e^(-6*d*x - 6*c) + e^(-8*d*x - 8*c) + 1))) - a^2*(ar 
ctan(e^(-d*x - c))/d - (e^(-d*x - c) - e^(-3*d*x - 3*c))/(d*(2*e^(-2*d*x - 
 2*c) + e^(-4*d*x - 4*c) + 1)))
 
3.1.95.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (117) = 234\).

Time = 0.36 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.14 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {3 \, {\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x - c\right )}\right )\right )} {\left (8 \, a^{2} + 4 \, a b + b^{2}\right )} + \frac {4 \, {\left (24 \, a^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{5} + 12 \, a b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{5} + 3 \, b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{5} + 192 \, a^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{3} - 32 \, b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{3} + 384 \, a^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 192 \, a b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 48 \, b^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}\right )}}{{\left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}^{3}}}{96 \, d} \]

input
integrate(sech(d*x+c)^3*(a+b*tanh(d*x+c)^2)^2,x, algorithm="giac")
 
output
1/96*(3*(pi + 2*arctan(1/2*(e^(2*d*x + 2*c) - 1)*e^(-d*x - c)))*(8*a^2 + 4 
*a*b + b^2) + 4*(24*a^2*(e^(d*x + c) - e^(-d*x - c))^5 + 12*a*b*(e^(d*x + 
c) - e^(-d*x - c))^5 + 3*b^2*(e^(d*x + c) - e^(-d*x - c))^5 + 192*a^2*(e^( 
d*x + c) - e^(-d*x - c))^3 - 32*b^2*(e^(d*x + c) - e^(-d*x - c))^3 + 384*a 
^2*(e^(d*x + c) - e^(-d*x - c)) - 192*a*b*(e^(d*x + c) - e^(-d*x - c)) - 4 
8*b^2*(e^(d*x + c) - e^(-d*x - c)))/((e^(d*x + c) - e^(-d*x - c))^2 + 4)^3 
)/d
 
3.1.95.9 Mupad [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 572, normalized size of antiderivative = 4.58 \[ \int \text {sech}^3(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (8\,a^2\,\sqrt {d^2}+b^2\,\sqrt {d^2}+4\,a\,b\,\sqrt {d^2}\right )}{d\,\sqrt {64\,a^4+64\,a^3\,b+32\,a^2\,b^2+8\,a\,b^3+b^4}}\right )\,\sqrt {64\,a^4+64\,a^3\,b+32\,a^2\,b^2+8\,a\,b^3+b^4}}{8\,\sqrt {d^2}}-\frac {\frac {2\,{\mathrm {e}}^{c+d\,x}\,{\left (a+b\right )}^2}{3\,d}+\frac {8\,{\mathrm {e}}^{3\,c+3\,d\,x}\,\left (a^2-b^2\right )}{3\,d}+\frac {8\,{\mathrm {e}}^{7\,c+7\,d\,x}\,\left (a^2-b^2\right )}{3\,d}+\frac {2\,{\mathrm {e}}^{9\,c+9\,d\,x}\,{\left (a+b\right )}^2}{3\,d}+\frac {4\,{\mathrm {e}}^{5\,c+5\,d\,x}\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{3\,d}}{6\,{\mathrm {e}}^{2\,c+2\,d\,x}+15\,{\mathrm {e}}^{4\,c+4\,d\,x}+20\,{\mathrm {e}}^{6\,c+6\,d\,x}+15\,{\mathrm {e}}^{8\,c+8\,d\,x}+6\,{\mathrm {e}}^{10\,c+10\,d\,x}+{\mathrm {e}}^{12\,c+12\,d\,x}+1}-\frac {2\,{\mathrm {e}}^{c+d\,x}\,\left (15\,b^2+4\,a\,b\right )}{3\,d\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}+\frac {16\,b^2\,{\mathrm {e}}^{c+d\,x}}{3\,d\,\left (5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1\right )}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (8\,a^2+4\,a\,b+b^2\right )}{8\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {{\mathrm {e}}^{c+d\,x}\,\left (16\,a^2+44\,a\,b+23\,b^2\right )}{12\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (21\,b^2+20\,a\,b\right )}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )} \]

input
int((a + b*tanh(c + d*x)^2)^2/cosh(c + d*x)^3,x)
 
output
(atan((exp(d*x)*exp(c)*(8*a^2*(d^2)^(1/2) + b^2*(d^2)^(1/2) + 4*a*b*(d^2)^ 
(1/2)))/(d*(8*a*b^3 + 64*a^3*b + 64*a^4 + b^4 + 32*a^2*b^2)^(1/2)))*(8*a*b 
^3 + 64*a^3*b + 64*a^4 + b^4 + 32*a^2*b^2)^(1/2))/(8*(d^2)^(1/2)) - ((2*ex 
p(c + d*x)*(a + b)^2)/(3*d) + (8*exp(3*c + 3*d*x)*(a^2 - b^2))/(3*d) + (8* 
exp(7*c + 7*d*x)*(a^2 - b^2))/(3*d) + (2*exp(9*c + 9*d*x)*(a + b)^2)/(3*d) 
 + (4*exp(5*c + 5*d*x)*(3*a^2 - 2*a*b + 3*b^2))/(3*d))/(6*exp(2*c + 2*d*x) 
 + 15*exp(4*c + 4*d*x) + 20*exp(6*c + 6*d*x) + 15*exp(8*c + 8*d*x) + 6*exp 
(10*c + 10*d*x) + exp(12*c + 12*d*x) + 1) - (2*exp(c + d*x)*(4*a*b + 15*b^ 
2))/(3*d*(4*exp(2*c + 2*d*x) + 6*exp(4*c + 4*d*x) + 4*exp(6*c + 6*d*x) + e 
xp(8*c + 8*d*x) + 1)) + (16*b^2*exp(c + d*x))/(3*d*(5*exp(2*c + 2*d*x) + 1 
0*exp(4*c + 4*d*x) + 10*exp(6*c + 6*d*x) + 5*exp(8*c + 8*d*x) + exp(10*c + 
 10*d*x) + 1)) + (exp(c + d*x)*(4*a*b + 8*a^2 + b^2))/(8*d*(exp(2*c + 2*d* 
x) + 1)) - (exp(c + d*x)*(44*a*b + 16*a^2 + 23*b^2))/(12*d*(2*exp(2*c + 2* 
d*x) + exp(4*c + 4*d*x) + 1)) + (exp(c + d*x)*(20*a*b + 21*b^2))/(3*d*(3*e 
xp(2*c + 2*d*x) + 3*exp(4*c + 4*d*x) + exp(6*c + 6*d*x) + 1))